/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.cx1.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.StringUtils;

/**
 *
 * @author ECH
 */
public class Place extends Base implements Serializable {
    
    private static final long serialVersionUID = 1;
            
    private String title;
    private String notes;
    private String description;
    private String shortDescription;
    
    private String address;
        
    private String number;
    private String street;
    private String barangay;
    private String zip;
    private String city;
    private String region;
    private String country;
        
    private String lat;
    private String lng;
    
    private String wikiURL;
    
    //CX: references to objects
    private String placeTypeID;
    private String typeID;
    private List<String> amenityIDs = new ArrayList<String>(0);
    
    //x
    private String primaryPhotoID;    
    private List<String> photoIDs = new ArrayList<String>(0);
    
    private List<String> cityIDs = new ArrayList<String>(0);
    private List<String> districtIDs = new ArrayList<String>(0);
    private List<String> buildingIDs = new ArrayList<String>(0);
    private List<String> villageIDs = new ArrayList<String>(0);
    
    //CX: referenced objects   
    private PlaceType placeType;    
    private List<Amenity> amenities = new ArrayList<Amenity>(0);
    
    //x
    private Photo primaryPhoto;        
    private List<Photo> photos = new ArrayList<Photo>(0); 
    
    private List<Place> cities = new ArrayList<Place>(0);  
    private List<Place> districts = new ArrayList<Place>(0);  
    private List<Place> buildings = new ArrayList<Place>(0);  
    private List<Place> villages = new ArrayList<Place>(0);  
                
    //CX: display objects    
    private String displayCity;
    
    private List<Listing> listings = new ArrayList<Listing>(0);
    
    //CX: foursq
    private String foursqVenueID;
        
    private long impressions;
    private long views;
    
    public Place() {
        
    }

    public Place(String typeID, String title, String address) {
        this.placeTypeID = typeID;
        this.title = title;
        this.address = address;
    }

    public Place(String id, String typeID, String title, String address) {
        this.setId(id);
        this.placeTypeID = typeID;
        this.title = title;
        this.address = address;
    }

    public PlaceType getPlaceType() {
        return placeType;
    }

    public void setPlaceType(PlaceType placeType) {
        this.placeType = placeType;
    }
   
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getLat() {
        return lat;
    }

    public void setLat(String lat) {
        this.lat = lat;
    }

    public String getLng() {
        return lng;
    }

    public void setLng(String lng) {
        this.lng = lng;
    }

    public Photo getPrimaryPhoto() {
        return primaryPhoto;
    }

    public void setPrimaryPhoto(Photo primaryPhoto) {
        this.primaryPhoto = primaryPhoto;
    }

    public List<Photo> getPhotos() {
        return photos;
    }

    public void setPhotos(List<Photo> photos) {
        this.photos = photos;
    }

    public String getPrimaryPhotoID() {
        return primaryPhotoID;
    }

    public void setPrimaryPhotoID(String primaryPhotoID) {
        this.primaryPhotoID = primaryPhotoID;
    }

    public List<String> getPhotoIDs() {
        return photoIDs;
    }

    public void setPhotoIDs(List<String> photoIDs) {
        this.photoIDs = photoIDs;
    }

    public String getPlaceTypeID() {
        return placeTypeID;
    }

    public void setPlaceTypeID(String typeID) {
        this.placeTypeID = typeID;
    }

    public List<String> getCityIDs() {
        return cityIDs;
    }

    public void setCityIDs(List<String> cityIDs) {
        this.cityIDs = cityIDs;
    }

    public List<String> getDistrictIDs() {
        return districtIDs;
    }

    public void setDistrictIDs(List<String> districtIDs) {
        this.districtIDs = districtIDs;
    }

    public List<String> getBuildingIDs() {
        return buildingIDs;
    }

    public void setBuildingIDs(List<String> buildingIDs) {
        this.buildingIDs = buildingIDs;
    }

    public List<String> getVillageIDs() {
        return villageIDs;
    }

    public void setVillageIDs(List<String> villageIDs) {
        this.villageIDs = villageIDs;
    }

    public List<Place> getCities() {
        return cities;
    }

    public void setCities(List<Place> cities) {
        this.cities = cities;
    }

    public List<Place> getDistricts() {
        return districts;
    }

    public void setDistricts(List<Place> districts) {
        this.districts = districts;
    }

    public List<Place> getBuildings() {
        return buildings;
    }

    public void setBuildings(List<Place> buildings) {
        this.buildings = buildings;
    }

    public List<Place> getVillages() {
        return villages;
    }

    public void setVillages(List<Place> villages) {
        this.villages = villages;
    }

    public List<Listing> getListings() {
        return listings;
    }

    public void setListings(List<Listing> listings) {
        this.listings = listings;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getBarangay() {
        return barangay;
    }

    public void setBarangay(String barangay) {
        this.barangay = barangay;
    }

    public String getStreet() {
        return street;
    }

    public void setStreet(String street) {
        this.street = street;
    }

    public String getZip() {
        return zip;
    }

    public void setZip(String zip) {
        this.zip = zip;
    }

    public List<String> getAmenityIDs() {
        return amenityIDs;
    }

    public void setAmenityIDs(List<String> amenityIDs) {
        this.amenityIDs = amenityIDs;
    }

    public List<Amenity> getAmenities() {
        return amenities;
    }

    public void setAmenities(List<Amenity> amenities) {
        this.amenities = amenities;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    @Override
    public boolean equals(Object obj) {
        boolean equals = false;
        if (obj instanceof Place) {
            Place p = (Place) obj;
            if (StringUtils.equals(this.getId(), p.getId())) {
                equals = true;
            }            
        }
        return equals;
    }

    @Override
    public int hashCode() {
        return 0; //To change body of generated methods, choose Tools | Templates.
    }

    public String getDisplayCity() {
        return displayCity;
    }

    public void setDisplayCity(String displayCity) {
        this.displayCity = displayCity;
    }

    public String getWikiURL() {
        return wikiURL;
    }

    public void setWikiURL(String wikiURL) {
        this.wikiURL = wikiURL;
    }

    public String getShortDescription() {
        return shortDescription;
    }

    public void setShortDescription(String shortDescription) {
        this.shortDescription = shortDescription;
    }

    public String getTypeID() {
        return typeID;
    }

    public void setTypeID(String typeID) {
        this.typeID = typeID;
    }

    public String getFoursqVenueID() {
        return foursqVenueID;
    }

    public void setFoursqVenueID(String foursqVenueID) {
        this.foursqVenueID = foursqVenueID;
    }

    public long getImpressions() {
        return impressions;
    }

    public void setImpressions(long impressions) {
        this.impressions = impressions;
    }

    public long getViews() {
        return views;
    }

    public void setViews(long views) {
        this.views = views;
    }

    
}
